<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Won-松的趣味分享</title>
	<link rel="stylesheet" type="text/css" href="../css/bass.css"/>
	<link rel="stylesheet" type="text/css" href="../css/funstyle.css"/>
</head>
<body>
	<div class="wrap">
		<!--head-->
		<div class="w100">
			<!--head-top-->
			<div class="headtop w960 clearfix">
				<div class="logo fl"><a href="#"><img src="../img/logo.png"></a></div>
		<?php
			$id = $_GET['id'];
			include("../function.php");
			$conn = conn();
			$resourse = mysqli_query($conn,"select * from nav");
			mysqli_query($conn,"update article set view=view+1 where id=$id");   
			while ($row = mysqli_fetch_assoc($resourse)){
		?>
				<div class="nav fl">
					<ul>
						<li class="fl ml25"><a href="<?php echo $row["addr"]?>"><?php echo $row['option']?></a></li>
				</div>
		<?php
			}
		?>
			</div>
			<div class="clear"></div>
			<!--head-background-->
			<div class="bg">
				<div class="title"><h2>趣味分享</h2></div>
				<ul class="clearfix">
					<li class='fl'><a href="#">全部</a></li>
				<?php 
					$resourse = mysqli_query($conn,"select * from cata_log");   
					while ($data = mysqli_fetch_assoc($resourse)){
				?>
					<li class="fl"><a href="<?=$row["id"]?>"><?=$data["class"]?></a></li>
				<?php 
					}

				?>
				</ul>
			</div>
		</div>
		<div class="clear"></div>
		<!--main-->
	<?php
		$resourse = mysqli_query($conn,"select * from article where id=$id"); 
		while ($row = mysqli_fetch_assoc($resourse)){ 
	?>
		<h2><?=$row['title']?></h2>
		<div class="w960"><?=$row['content']?></div>
	<?php
		}
	?>
	</di>
</body>
</html>